package org.dothwinds.springbootstudy;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@ServletComponentScan
@RestController
public class SpringBootStudyApplication {

    private static final Logger LOG = LoggerFactory.getLogger(SpringBootStudyApplication.class);

    public static void main(String[] args) {
        SpringApplication.run(SpringBootStudyApplication.class, args);
    }

    @GetMapping("/")
    public String sayHello(){
        LOG.debug("这是org.dothwinds包下的debug level输出");
        return "hello world";
    }

}
